//package com.wang.springbootinit.config;
//
//
//import org.springframework.amqp.core.*;
//import org.springframework.beans.factory.annotation.Qualifier;
//import org.springframework.context.annotation.Bean;
//import org.springframework.context.annotation.Configuration;
//
//@Configuration
//public class RabbitmqConfig {
//    final String excelTopic = "topic.excel.saveData";
//    final String excelExchange = "ExcelTopicExchange";
//    //创建队列
//    @Bean(name = "excelTopic")
//    public Queue excelTopic() {
//        return new Queue(excelTopic);
//    }
//
//    //2、配置交换机Exchange
//    @Bean(name = "excelExchange" )
//    public TopicExchange excelExchange() {
//        return new TopicExchange(excelExchange);
//    }
//
//    //3、将队列按照相应的规则绑定到交换机上
//    @Bean
//    Binding bindingExchangeMessages(@Qualifier("excelTopic") Queue excelTopic,
//                                    @Qualifier("excelExchange") TopicExchange excelExchange) {
//        return BindingBuilder.bind(excelTopic).to(excelExchange).with("topic.excel.*");
//    }
//}
